/*
* created by Administrator on 2018/11/20
* 好的代码像粥一样,是得用时间和精力熬的。
*/
var navContainer = document.getElementsByClassName('nav--bar')[0];
var AAA = document.getElementsByClassName('item--more');
var imggggg = document.getElementsByClassName('nav--bar__icon')[0];
var contacttopPic = document.getElementsByClassName('fixation--right__stick')[0];
var currentY = 0;
window.onscroll = function () {
    currentY = document.documentElement.scrollTop;
    console.log(currentY);
    if(currentY >= 60){
        for(var i =0; i <AAA.length; i++){
            AAA[i].style.color = "#434242";
        }
        contacttopPic.style.opacity = '1';
        navContainer.style.backgroundColor = '#fff';
        imggggg.src ='../img/first_images/iphone_logo.png';
    }else if(currentY === 0){
        for(var i =0; i <AAA.length; i++){
            AAA[i].style.color = "#fff";
        }
        contacttopPic.style.opacity = '0';
        imggggg.src ='../img/first_images/145x45baise.png';
        navContainer.style.backgroundColor = 'unset';
    }
};
